* Load File
import delimited "/Users/josephphillips/Dropbox/Projects/Monarchism in the UK/IE data.csv", encoding(ISO-8859-1)

* Recode age
recode agegroup 17=15

* Create Dummy Variables for Country
gen england = .
replace england=1 if country=="England"
replace england=0 if country!="England"
gen wales = .
replace wales=1 if country=="Wales"
replace wales=0 if country!="Wales"
gen scotland = .
replace scotland=1 if country=="Scotland"
replace scotland=0 if country!="Scotland"

* Run Main Analyses
apc_ie morchism wales scotland, age(agegroup) period(periodgroup) family(gaussian) link(identity)
apc_ie abolition wales scotland, age(agegroup) period(periodgroup) family(gaussian) link(identity)